﻿using System;

namespace Snowflake.Entity
{
    /// <summary>
    /// Gets the state of Entity Object
    /// </summary>
    [Serializable]
    public enum EntityObjectState : short
    {
        /// <summary>
        /// Entity Object has no changes in its properties, when is loaded from the database or when is invoked AcceptChanges()
        /// </summary>
        Unchanged = 0,
        /// <summary>
        /// Entity Object has Added State, when is set as Added or from Detached stated is inserted in EntityList
        /// </summary>
        Added = 1,
        /// <summary>
        /// Entity Object has Deleted State, when is set as Deleted
        /// </summary>
        Deleted = 2,
        /// <summary>
        /// Entity Object has Modified State, when some of its properties is changed
        /// </summary>
        Modified = 3,
        /// <summary>
        /// Entity Object has Detached State, when is not included in EntityList
        /// </summary>
        Detached = 4
    }
}
